
class NumbersGame:
    # 编写构造函数
    def __init__(self, num_1: int, num_2: int):
        self.num_1 = num_1
        self.num_2 = num_2

    # 如果 Stan 赢了，打印 Stan wins，否则打印 Ollie wins。
    # 这是一场 Stan 必胜的比赛
    # Stan  m = 12 n = 6  K = 12 - 1 * 6 = 6 <--- 这是左右胜负的关键位置
    # Ollie m = 6  n = 6  K = 6 - 1 * 6  = 0
    # Stan  m = 6  n = 0  Stan wins

    # m = 2n
    # Rules 2 如果一开始的时候，当 m / n > 1 的时候，Stan 必胜
    # Rules 3 当 m / n == 1 and m % n != 0 的时候，会发生有游戏胜利决定权的转移

    # Rules 1
    # 如果一开始的两个数字相同，Ollie 必胜
    # Stan  m = 12 n = 12 K = 12 - 1 * 12 = 0
    # Ollie m = 12 n = 0 Ollie Wins

    # 这是一场 Stan 必胜的比赛
    # Stan  m = 12 n = 7 K = 12 - 1 * 7 = 5
    # Ollie m = 7  n = 5 K = 7 - 1 * 5 = 2
    # Stan  m = 5  n = 2 K = 5 - 1 * 2 = 3 <-------- Key point
    # Ollie m = 3  n = 2 K = 3 - 1 * 2 = 1
    # Stan  m = 2  n = 1 K = 2 - 1 * 1 = 1
    # Ollie m = 1  n = 1
    # Stan  m = 1  n = 0 -> Stan wins

    # Stan  m = 5  n = 2 K = 5 - 2 * 2 = 1
    # Ollie m = 2  n = 1 K = 2 - 1 * 1 = 1
    # Stan  m = 1  n = 1
    # Ollie m = 1  n = 0 -> Ollie wins

    def solution(self):
        pass

# 写一个 preparation 的函数
def preparation(input: str) -> NumbersGame:
    f = open("game.in", "r")

    numbers = [int(i) for i in f.readline().split()]
    n1 = int(numbers[0])
    n2 = int(numbers[1])

    f.close()

    # Make sure n1 is greater or equal than n2.
    if n1 < n2:
        n1, n2 = n2, n1

    return NumbersGame(num_1 = n1, num_2 = n2)